import request from '@/utils/request'

const apiUrl = '/api/powerCost'
// 获取发电费用分页列表
export function getPowerCostPage(current, size, loadName) {
    return request({
        url: `${apiUrl}/page`,
        method: 'get',
        params: {
            current,
            size,
            loadName
        }
    })
}

// 保存发电费用
export function savePowerCost(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 根据ID获取发电费用
export function getPowerCostById(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

// 删除发电费用
export function deletePowerCost(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
}

// 批量删除发电费用
export function batchDeletePowerCost(ids) {
    return request({
        url: `${apiUrl}/batch`,
        method: 'delete',
        data: ids
    })
} 